<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>File Source for CssParser.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
	<script src="media/a.js"></script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">QueryPath<br /><div class="header-top-right-subpackage">CSSParser</div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                        
                                                  		[ <a href="../classtrees_QueryPath.html" class="menu">class tree: QueryPath</a> ]
		[ <a href="../elementindex_QueryPath.html" class="menu">index: QueryPath</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">QueryPath</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_QueryPath.html">QueryPath</a><br />
              <a href="../li_Examples.html">Examples</a><br />
              <a href="../li_Tests.html">Tests</a><br />
      	</div>
      <br />
                        <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file CssParser.php</h1>
<p>Documentation is available at <a href="../QueryPath/CSSParser/_src---QueryPath---CssParser.php.html">CssParser.php</a></p>
<div class="src-code"><span class="php">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;CSS&nbsp;selector&nbsp;parsing&nbsp;classes.</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;file&nbsp;contains&nbsp;the&nbsp;tools&nbsp;necessary&nbsp;for&nbsp;parsing&nbsp;CSS&nbsp;3&nbsp;selectors.</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;In&nbsp;the&nbsp;future&nbsp;it&nbsp;may&nbsp;be&nbsp;expanded&nbsp;to&nbsp;handle&nbsp;all&nbsp;of&nbsp;CSS&nbsp;3.</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;The&nbsp;parser&nbsp;contained&nbsp;herein&nbsp;is&nbsp;has&nbsp;an&nbsp;event-based&nbsp;API.&nbsp;Implementors&nbsp;should</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;begin&nbsp;by&nbsp;implementing&nbsp;the&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;CssEventHandler}</span><span class="src-doc">&nbsp;interface.&nbsp;For&nbsp;an&nbsp;example</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;of&nbsp;how&nbsp;this&nbsp;is&nbsp;done,&nbsp;see&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;CssEventHandler.php}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@subpackage</span><span class="src-doc">&nbsp;CSSParser</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;M&nbsp;Butcher&nbsp;&lt;matt@aleph-null.tv&gt;</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;http://opensource.org/licenses/lgpl-2.1.php&nbsp;The&nbsp;GNU&nbsp;Lesser&nbsp;GPL&nbsp;(LGPL)&nbsp;or&nbsp;an&nbsp;MIT-like&nbsp;license.</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a17"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">'CssEventHandler.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a19"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a20"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;An&nbsp;event&nbsp;handler&nbsp;for&nbsp;handling&nbsp;CSS&nbsp;3&nbsp;Selector&nbsp;parsing.</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;provides&nbsp;a&nbsp;standard&nbsp;interface&nbsp;for&nbsp;CSS&nbsp;3&nbsp;Selector&nbsp;event&nbsp;handling.&nbsp;As&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;parser&nbsp;parses&nbsp;a&nbsp;selector,&nbsp;it&nbsp;will&nbsp;fire&nbsp;events.&nbsp;Implementations&nbsp;of&nbsp;CssEventHandler</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*&nbsp;can&nbsp;then&nbsp;handle&nbsp;the&nbsp;events.</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;library&nbsp;is&nbsp;inspired&nbsp;by&nbsp;the&nbsp;SAX2&nbsp;API&nbsp;for&nbsp;parsing&nbsp;XML.&nbsp;Each&nbsp;component&nbsp;of&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*&nbsp;selector&nbsp;fires&nbsp;an&nbsp;event,&nbsp;passing&nbsp;the&nbsp;necessary&nbsp;data&nbsp;on&nbsp;to&nbsp;the&nbsp;event&nbsp;handler.</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-key">interface&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;is-exactly&nbsp;(=)&nbsp;operator.&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a33"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">isExactly&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;=&nbsp;</span></div></li>
<li><div class="src-line"><a name="a34"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;contains-with-space&nbsp;operator&nbsp;(~=).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a35"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">containsWithSpace&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;~=</span></div></li>
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;contains-with-hyphen&nbsp;operator&nbsp;(!=).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">containsWithHyphen&nbsp;</span>=&nbsp;<span class="src-num">2</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;|=</span></div></li>
<li><div class="src-line"><a name="a38"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;contains-in-string&nbsp;operator&nbsp;(*=).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">containsInString&nbsp;</span>=&nbsp;<span class="src-num">3</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;*=</span></div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;begins-with&nbsp;operator&nbsp;(^=).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">beginsWith&nbsp;</span>=&nbsp;<span class="src-num">4</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;^=</span></div></li>
<li><div class="src-line"><a name="a42"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;ends-with&nbsp;operator&nbsp;($=).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a43"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">endsWith&nbsp;</span>=&nbsp;<span class="src-num">5</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;$=</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;&nbsp;<span class="src-doc">/**&nbsp;The&nbsp;any-element&nbsp;operator&nbsp;(*).&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">anyElement&nbsp;</span>=&nbsp;<span class="src-str">'*'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;event&nbsp;is&nbsp;fired&nbsp;when&nbsp;a&nbsp;CSS&nbsp;ID&nbsp;is&nbsp;encountered.</span></div></li>
<li><div class="src-line"><a name="a49"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;An&nbsp;ID&nbsp;begins&nbsp;with&nbsp;an&nbsp;octothorp:&nbsp;#name.</span></div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$id&nbsp;</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;ID&nbsp;passed&nbsp;in.</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodelementID">elementID</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;#name</span></div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;element&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a57"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;name</span></div></li>
<li><div class="src-line"><a name="a58"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a59"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;element.</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodelement">element</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;name</span></div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;namespaced&nbsp;element&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a64"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;example:&nbsp;namespace|name</span></div></li>
<li><div class="src-line"><a name="a65"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a66"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;tag&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$namespace&nbsp;</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;namespace&nbsp;identifier&nbsp;(Not&nbsp;the&nbsp;URI)</span></div></li>
<li><div class="src-line"><a name="a69"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodelementNS">elementNS</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$namespace&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;any-element&nbsp;(*)&nbsp;operator.</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a74"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodanyElement">anyElement</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;any-element&nbsp;operator&nbsp;that&nbsp;is&nbsp;constrained&nbsp;to&nbsp;a&nbsp;namespace.</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;ns|*</span></div></li>
<li><div class="src-line"><a name="a79"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$ns&nbsp;</span></div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;namespace&nbsp;identifier&nbsp;(not&nbsp;the&nbsp;URI).</span></div></li>
<li><div class="src-line"><a name="a81"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodanyElementInNS">anyElementInNS</a><span class="src-sym">(</span><span class="src-var">$ns</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;ns|*</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;CSS&nbsp;class&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;.name</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;name&nbsp;of&nbsp;the&nbsp;class.</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodelementClass">elementClass</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;.name</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;attribute&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;[name=attr]</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;[name~=attr]</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a95"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;attribute&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a96"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a97"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;value&nbsp;of&nbsp;the&nbsp;attribute,&nbsp;if&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a98"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$operation&nbsp;</span></div></li>
<li><div class="src-line"><a name="a99"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;operation&nbsp;to&nbsp;be&nbsp;used&nbsp;for&nbsp;matching.&nbsp;See&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;CssEventHandler}</span></div></li>
<li><div class="src-line"><a name="a100"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;constants&nbsp;for&nbsp;a&nbsp;list&nbsp;of&nbsp;supported&nbsp;operations.</span></div></li>
<li><div class="src-line"><a name="a101"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodattribute">attribute</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$operation&nbsp;</span>=&nbsp;<span class="src-id">CssEventHandler</span><span class="src-sym">::</span><span class="src-id">isExactly</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;[name=attr]</span></div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a104"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;attribute&nbsp;selector&nbsp;bound&nbsp;to&nbsp;a&nbsp;specific&nbsp;namespace.</span></div></li>
<li><div class="src-line"><a name="a105"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;[ns|name=attr]</span></div></li>
<li><div class="src-line"><a name="a106"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;[ns|name~=attr]</span></div></li>
<li><div class="src-line"><a name="a107"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a108"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;attribute&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a110"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;value&nbsp;of&nbsp;the&nbsp;attribute,&nbsp;if&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$operation&nbsp;</span></div></li>
<li><div class="src-line"><a name="a112"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;operation&nbsp;to&nbsp;be&nbsp;used&nbsp;for&nbsp;matching.&nbsp;See&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;CssEventHandler}</span></div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;constants&nbsp;for&nbsp;a&nbsp;list&nbsp;of&nbsp;supported&nbsp;operations.</span></div></li>
<li><div class="src-line"><a name="a114"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$namespace&nbsp;</span></div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;namespace&nbsp;identifier&nbsp;(not&nbsp;the&nbsp;URI).</span></div></li>
<li><div class="src-line"><a name="a116"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodattributeNS">attributeNS</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$ns</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$operation&nbsp;</span>=&nbsp;<span class="src-id">CssEventHandler</span><span class="src-sym">::</span><span class="src-id">isExactly</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a119"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;pseudo-class.</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;:name(value)</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a122"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;pseudo-class&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a124"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;value,&nbsp;if&nbsp;one&nbsp;is&nbsp;found.</span></div></li>
<li><div class="src-line"><a name="a125"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodpseudoClass">pseudoClass</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//:name(value)</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a128"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;pseudo-element.</span></div></li>
<li><div class="src-line"><a name="a129"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;::name</span></div></li>
<li><div class="src-line"><a name="a130"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$name&nbsp;</span></div></li>
<li><div class="src-line"><a name="a131"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;pseudo-element&nbsp;name.</span></div></li>
<li><div class="src-line"><a name="a132"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodpseudoElement">pseudoElement</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;::name</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;direct&nbsp;descendant&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;&gt;</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methoddirectDescendant">directDescendant</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;&gt;</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a140"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;adjacent&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;+</span></div></li>
<li><div class="src-line"><a name="a142"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodadjacent">adjacent</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;+</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;another-selector&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a146"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;,</span></div></li>
<li><div class="src-line"><a name="a147"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodanotherSelector">anotherSelector</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;,</span></div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a150"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;sibling&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a151"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;~</span></div></li>
<li><div class="src-line"><a name="a152"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodsibling">sibling</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;~&nbsp;combinator</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a155"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;any-descendant&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a156"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Example:&nbsp;'&nbsp;'</span></div></li>
<li><div class="src-line"><a name="a157"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssEventHandler.html#methodanyDescendant">anyDescendant</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;'&nbsp;'&nbsp;(space)&nbsp;operator.</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a160"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a162"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a163"></a><span class="src-doc">&nbsp;*&nbsp;Tokens&nbsp;for&nbsp;CSS.</span></div></li>
<li><div class="src-line"><a name="a164"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;class&nbsp;defines&nbsp;the&nbsp;recognized&nbsp;tokens&nbsp;for&nbsp;the&nbsp;parser,&nbsp;and&nbsp;also</span></div></li>
<li><div class="src-line"><a name="a165"></a><span class="src-doc">&nbsp;*&nbsp;provides&nbsp;utility&nbsp;functions&nbsp;for&nbsp;error&nbsp;reporting.</span></div></li>
<li><div class="src-line"><a name="a166"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a167"></a><span class="src-key">final&nbsp;</span><span class="src-key">class&nbsp;</span><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">char&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">star&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">rangle&nbsp;</span>=&nbsp;<span class="src-num">2</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">dot&nbsp;</span>=&nbsp;<span class="src-num">3</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">octo&nbsp;</span>=&nbsp;<span class="src-num">4</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">rsquare&nbsp;</span>=&nbsp;<span class="src-num">5</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">lsquare&nbsp;</span>=&nbsp;<span class="src-num">6</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">colon&nbsp;</span>=&nbsp;<span class="src-num">7</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">rparen&nbsp;</span>=&nbsp;<span class="src-num">8</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">lparen&nbsp;</span>=&nbsp;<span class="src-num">9</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a178"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">plus&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a179"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">tilde&nbsp;</span>=&nbsp;<span class="src-num">11</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a180"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">eq&nbsp;</span>=&nbsp;<span class="src-num">12</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a181"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">pipe&nbsp;</span>=&nbsp;<span class="src-num">13</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a182"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">comma&nbsp;</span>=&nbsp;<span class="src-num">14</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">white&nbsp;</span>=&nbsp;<span class="src-num">15</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">quote&nbsp;</span>=&nbsp;<span class="src-num">16</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">squote&nbsp;</span>=&nbsp;<span class="src-num">17</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">bslash&nbsp;</span>=&nbsp;<span class="src-num">18</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">carat&nbsp;</span>=&nbsp;<span class="src-num">19</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">dollar&nbsp;</span>=&nbsp;<span class="src-num">20</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">at&nbsp;</span>=&nbsp;<span class="src-num">21</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;This&nbsp;is&nbsp;not&nbsp;in&nbsp;the&nbsp;spec.&nbsp;Apparently,&nbsp;old&nbsp;broken&nbsp;CSS&nbsp;uses&nbsp;it.</span></div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;In&nbsp;legal&nbsp;range&nbsp;for&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;&nbsp;<span class="src-key">const&nbsp;</span><span class="src-id">stringLegal&nbsp;</span>=&nbsp;<span class="src-num">99</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a195"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;a&nbsp;name&nbsp;for&nbsp;a&nbsp;given&nbsp;constant.&nbsp;Used&nbsp;for&nbsp;error&nbsp;handling.</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a197"></a>&nbsp;&nbsp;<span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssToken.html#methodname">name</a><span class="src-sym">(</span><span class="src-var">$const_int</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a198"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$a&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'character'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'star'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'right&nbsp;angle&nbsp;bracket'</span><span class="src-sym">,&nbsp;</span></div></li>
<li><div class="src-line"><a name="a199"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'dot'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'octothorp'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'right&nbsp;square&nbsp;bracket'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'left&nbsp;square&nbsp;bracket'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'colon'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'right&nbsp;parenthesis'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'left&nbsp;parenthesis'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'plus'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'tilde'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'equals'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'vertical&nbsp;bar'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'comma'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'space'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'quote'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'single&nbsp;quote'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'backslash'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'carat'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'dollar'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'at'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$a</span><span class="src-sym">[</span><span class="src-var">$const_int</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$a</span><span class="src-sym">[</span><span class="src-var">$const_int</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a206"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$const_int&nbsp;</span>==&nbsp;<span class="src-num">99</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-str">'a&nbsp;legal&nbsp;non-alphanumeric&nbsp;character'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$const_int&nbsp;</span>==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-str">'end&nbsp;of&nbsp;file'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'illegal&nbsp;character&nbsp;(%s)'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$const_int</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a214"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a216"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a217"></a><span class="src-doc">&nbsp;*&nbsp;Parse&nbsp;a&nbsp;CSS&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a218"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a219"></a><span class="src-doc">&nbsp;*&nbsp;In&nbsp;CSS,&nbsp;a&nbsp;selector&nbsp;is&nbsp;used&nbsp;to&nbsp;identify&nbsp;which&nbsp;element&nbsp;or&nbsp;elements</span></div></li>
<li><div class="src-line"><a name="a220"></a><span class="src-doc">&nbsp;*&nbsp;in&nbsp;a&nbsp;DOM&nbsp;are&nbsp;being&nbsp;selected&nbsp;for&nbsp;the&nbsp;application&nbsp;of&nbsp;a&nbsp;particular&nbsp;style.</span></div></li>
<li><div class="src-line"><a name="a221"></a><span class="src-doc">&nbsp;*&nbsp;Effectively,&nbsp;selectors&nbsp;function&nbsp;as&nbsp;a&nbsp;query&nbsp;language&nbsp;for&nbsp;a&nbsp;structured</span></div></li>
<li><div class="src-line"><a name="a222"></a><span class="src-doc">&nbsp;*&nbsp;document&nbsp;--&nbsp;almost&nbsp;always&nbsp;HTML&nbsp;or&nbsp;XML.</span></div></li>
<li><div class="src-line"><a name="a223"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;class&nbsp;provides&nbsp;an&nbsp;event-based&nbsp;parser&nbsp;for&nbsp;CSS&nbsp;selectors.&nbsp;It&nbsp;can&nbsp;be</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-doc">&nbsp;*&nbsp;used,&nbsp;for&nbsp;example,&nbsp;as&nbsp;a&nbsp;basis&nbsp;for&nbsp;writing&nbsp;a&nbsp;DOM&nbsp;query&nbsp;engine&nbsp;based&nbsp;on</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-doc">&nbsp;*&nbsp;CSS.</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a228"></a><span class="src-key">class&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html">CssParser</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">$scanner</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#var$buffer">$buffer</a>&nbsp;=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a231"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">$handler</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a232"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#var$strict">$strict</a>&nbsp;=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a233"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a234"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">$DEBUG</a>&nbsp;=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a235"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Construct&nbsp;a&nbsp;new&nbsp;CSS&nbsp;parser&nbsp;object.&nbsp;This&nbsp;will&nbsp;attempt&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a238"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;parse&nbsp;the&nbsp;string&nbsp;as&nbsp;a&nbsp;CSS&nbsp;selector.&nbsp;As&nbsp;it&nbsp;parses,&nbsp;it&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a239"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;send&nbsp;events&nbsp;to&nbsp;the&nbsp;CssEventHandler&nbsp;implementation.</span></div></li>
<li><div class="src-line"><a name="a240"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">,&nbsp;</span><span class="src-id">CssEventHandler&nbsp;</span><span class="src-var">$handler</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$is&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssInputStream.html">CssInputStream</a></span><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssScanner.html">CssScanner</a></span><span class="src-sym">(</span><span class="src-var">$is</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a>&nbsp;=&nbsp;<span class="src-var">$handler</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a248"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Parse&nbsp;the&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a250"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;begins&nbsp;an&nbsp;event-based&nbsp;parsing&nbsp;process&nbsp;that&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a251"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;fire&nbsp;events&nbsp;as&nbsp;the&nbsp;selector&nbsp;is&nbsp;handled.&nbsp;A&nbsp;CssEventHandler</span></div></li>
<li><div class="src-line"><a name="a252"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;implementation&nbsp;will&nbsp;be&nbsp;responsible&nbsp;for&nbsp;handling&nbsp;the&nbsp;events.</span></div></li>
<li><div class="src-line"><a name="a253"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#methodparse">parse</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-comm">/*&nbsp;throws&nbsp;CSSParseException&nbsp;*/&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;PARSE&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span>.&nbsp;<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">selector</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a263"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a264"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a265"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;A&nbsp;restricted&nbsp;parser&nbsp;that&nbsp;can&nbsp;only&nbsp;parse&nbsp;simple&nbsp;selectors.</span></div></li>
<li><div class="src-line"><a name="a266"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;pseudoClass&nbsp;handler&nbsp;for&nbsp;this&nbsp;parser&nbsp;will&nbsp;throw&nbsp;an</span></div></li>
<li><div class="src-line"><a name="a267"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;exception&nbsp;if&nbsp;it&nbsp;encounters&nbsp;a&nbsp;pseudo-element&nbsp;or&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a268"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;negation&nbsp;pseudo-class.</span></div></li>
<li><div class="src-line"><a name="a269"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssParser.html#methodparseSimpleSelector">parseSimpleSelector</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;SIMPLE&nbsp;SELECTOR\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">allElements</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementName</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementID</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">pseudoClass</span><span class="src-sym">(</span><span class="src-id">TRUE</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Operate&nbsp;in&nbsp;restricted&nbsp;mode.</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">attribute</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;Need&nbsp;to&nbsp;add&nbsp;failure&nbsp;conditions&nbsp;here.</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a285"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;an&nbsp;entire&nbsp;CSS&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a286"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">selector</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;SELECTOR\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Remove&nbsp;leading&nbsp;whitespace</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">simpleSelectors</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">combinator</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a293"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a294"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a295"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Consume&nbsp;whitespace&nbsp;and&nbsp;return&nbsp;a&nbsp;count&nbsp;of&nbsp;the&nbsp;number&nbsp;of&nbsp;whitespace&nbsp;consumed.</span></div></li>
<li><div class="src-line"><a name="a296"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;CONSUME&nbsp;WHITESPACE\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$white&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a300"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">white</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a301"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a302"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;++<span class="src-var">$white</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a303"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a304"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$white</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a307"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a308"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;one&nbsp;of&nbsp;the&nbsp;five&nbsp;combinators:&nbsp;'&gt;',&nbsp;'+',&nbsp;'&nbsp;',&nbsp;'~',&nbsp;and&nbsp;','.</span></div></li>
<li><div class="src-line"><a name="a309"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;call&nbsp;the&nbsp;appropriate&nbsp;event&nbsp;handlers.</span></div></li>
<li><div class="src-line"><a name="a310"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;CssEventHandler::directDescendant(),</span></div></li>
<li><div class="src-line"><a name="a311"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;CssEventHandler::adjacent(),</span></div></li>
<li><div class="src-line"><a name="a312"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;CssEventHandler::anyDescendant(),</span></div></li>
<li><div class="src-line"><a name="a313"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;CssEventHandler::anotherSelector().</span></div></li>
<li><div class="src-line"><a name="a314"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">combinator</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a316"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;COMBINATOR\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a317"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Problem:&nbsp;'&nbsp;'&nbsp;and&nbsp;'&nbsp;&gt;&nbsp;'&nbsp;are&nbsp;both&nbsp;valid&nbsp;combinators.</span></div></li>
<li><div class="src-line"><a name="a319"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;So&nbsp;we&nbsp;have&nbsp;to&nbsp;track&nbsp;whitespace&nbsp;consumption&nbsp;to&nbsp;see</span></div></li>
<li><div class="src-line"><a name="a320"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;if&nbsp;we&nbsp;are&nbsp;hitting&nbsp;the&nbsp;'&nbsp;'&nbsp;combinator&nbsp;or&nbsp;if&nbsp;the&nbsp;</span></div></li>
<li><div class="src-line"><a name="a321"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;selector&nbsp;just&nbsp;has&nbsp;whitespace&nbsp;padding&nbsp;another&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a322"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Flag&nbsp;to&nbsp;indicate&nbsp;that&nbsp;post-checks&nbsp;need&nbsp;doing</span></div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a326"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$white&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a327"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$t&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">;&nbsp;&nbsp;&nbsp;&nbsp;</span></div></li>
<li><div class="src-line"><a name="a328"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a329"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$t&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rangle</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a330"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">directDescendant</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a331"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a332"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//$this-&gt;simpleSelectors();</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$t&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">plus</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a336"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">adjacent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a337"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a338"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a339"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//$this-&gt;simpleSelectors();</span></div></li>
<li><div class="src-line"><a name="a340"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a341"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$t&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">comma</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a342"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">anotherSelector</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a343"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a344"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a345"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//$this-&gt;scanner-&gt;selectors();</span></div></li>
<li><div class="src-line"><a name="a346"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$t&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">tilde</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">sibling</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a350"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a351"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a352"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a353"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;that&nbsp;we&nbsp;don't&nbsp;get&nbsp;two&nbsp;combinators&nbsp;in&nbsp;a&nbsp;row.</span></div></li>
<li><div class="src-line"><a name="a354"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$inCombinator</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a355"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$white&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a356"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;COMBINATOR:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><a href="../QueryPath/CSSParser/CssToken.html#methodname">name</a><span class="src-sym">(</span><span class="src-var">$t</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a357"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a358"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">isCombinator</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a359"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;Illegal&nbsp;combinator:&nbsp;Cannot&nbsp;have&nbsp;two&nbsp;combinators&nbsp;in&nbsp;sequence.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a360"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a361"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a362"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;to&nbsp;see&nbsp;if&nbsp;we&nbsp;have&nbsp;whitespace&nbsp;combinator:</span></div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$white&nbsp;</span>&gt;&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a364"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;COMBINATOR:&nbsp;any&nbsp;descendant\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$inCombinator&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a366"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">anyDescendant</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a367"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a368"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a369"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;COMBINATOR:&nbsp;no&nbsp;combinator&nbsp;found.\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a372"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a373"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a375"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;if&nbsp;the&nbsp;token&nbsp;is&nbsp;a&nbsp;combinator.</span></div></li>
<li><div class="src-line"><a name="a376"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a377"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">isCombinator</span><span class="src-sym">(</span><span class="src-var">$tok</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a378"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$combinators&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">plus</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rangle</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">comma</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">tilde</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$tok</span><span class="src-sym">,&nbsp;</span><span class="src-var">$combinators</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a381"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a382"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a383"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;simple&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a384"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">simpleSelectors</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;SIMPLE&nbsp;SELECTOR\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a387"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">allElements</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementName</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">elementID</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">pseudoClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a392"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">attribute</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a393"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a394"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a395"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a396"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handles&nbsp;CSS&nbsp;ID&nbsp;selectors.</span></div></li>
<li><div class="src-line"><a name="a397"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;call&nbsp;CssEventHandler::elementID().</span></div></li>
<li><div class="src-line"><a name="a398"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a399"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">elementID</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;ELEMENT&nbsp;ID\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">octo</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a402"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a403"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a404"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;Expected&nbsp;string&nbsp;after&nbsp;#&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a405"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a406"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$id&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a407"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">elementID</span><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a408"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a409"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a410"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a411"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a412"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handles&nbsp;CSS&nbsp;class&nbsp;selectors.</span></div></li>
<li><div class="src-line"><a name="a413"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;call&nbsp;the&nbsp;CssEventHandler::elementClass()&nbsp;method.</span></div></li>
<li><div class="src-line"><a name="a414"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a415"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">elementClass</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a416"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;ELEMENT&nbsp;CLASS\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a417"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">dot</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a418"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a419"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;We're&nbsp;very&nbsp;fault&nbsp;tolerent.&nbsp;This&nbsp;should&nbsp;prob&nbsp;through&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a420"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$cssClass&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a421"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">elementClass</span><span class="src-sym">(</span><span class="src-var">$cssClass</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a422"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a423"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a424"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a425"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a426"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;a&nbsp;pseudo-class&nbsp;and&nbsp;pseudo-element.</span></div></li>
<li><div class="src-line"><a name="a427"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a428"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;CSS&nbsp;3&nbsp;selectors&nbsp;support&nbsp;separate&nbsp;pseudo-elements,&nbsp;using&nbsp;::&nbsp;instead</span></div></li>
<li><div class="src-line"><a name="a429"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;of&nbsp;:&nbsp;for&nbsp;separator.&nbsp;This&nbsp;is&nbsp;now&nbsp;supported,&nbsp;and&nbsp;calls&nbsp;the&nbsp;pseudoElement</span></div></li>
<li><div class="src-line"><a name="a430"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;handler,&nbsp;CssEventHandler::pseudoElement().</span></div></li>
<li><div class="src-line"><a name="a431"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a432"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;call&nbsp;CssEventHandler::pseudoClass()&nbsp;when&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a433"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;pseudo-class&nbsp;is&nbsp;parsed.</span></div></li>
<li><div class="src-line"><a name="a434"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a435"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">pseudoClass</span><span class="src-sym">(</span><span class="src-var">$restricted&nbsp;</span>=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a436"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;PSEUDO-CLASS\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a437"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">colon</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a438"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a439"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;for&nbsp;CSS&nbsp;3&nbsp;pseudo&nbsp;element:</span></div></li>
<li><div class="src-line"><a name="a440"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$isPseudoElement&nbsp;</span>=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a441"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">colon</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a442"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$isPseudoElement&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a443"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a444"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a445"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a446"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a447"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$restricted&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$name&nbsp;</span>==&nbsp;<span class="src-str">'not'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a448"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;The&nbsp;'not'&nbsp;pseudo-class&nbsp;is&nbsp;illegal&nbsp;in&nbsp;this&nbsp;context.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a449"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a450"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a451"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a452"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lparen</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a453"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$isPseudoElement</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a454"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;Illegal&nbsp;left&nbsp;paren.&nbsp;Pseudo-Element&nbsp;cannot&nbsp;have&nbsp;arguments.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a455"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a456"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">pseudoClassValue</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a457"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a458"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a459"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;FIXME:&nbsp;This&nbsp;should&nbsp;throw&nbsp;errors&nbsp;when&nbsp;pseudo&nbsp;element&nbsp;has&nbsp;values.</span></div></li>
<li><div class="src-line"><a name="a460"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$isPseudoElement</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a461"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$restricted</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a462"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;Pseudo-Elements&nbsp;are&nbsp;illegal&nbsp;in&nbsp;this&nbsp;context.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a463"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">pseudoElement</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a465"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a466"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a467"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Per&nbsp;the&nbsp;spec,&nbsp;pseudo-elements&nbsp;must&nbsp;be&nbsp;the&nbsp;last&nbsp;items&nbsp;in&nbsp;a&nbsp;selector,&nbsp;so&nbsp;we&nbsp;</span></div></li>
<li><div class="src-line"><a name="a468"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;check&nbsp;to&nbsp;make&nbsp;sure&nbsp;that&nbsp;we&nbsp;are&nbsp;either&nbsp;at&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;stream&nbsp;or&nbsp;that&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a469"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;new&nbsp;selector&nbsp;is&nbsp;starting.&nbsp;Only&nbsp;one&nbsp;pseudo-element&nbsp;is&nbsp;allowed&nbsp;per&nbsp;selector.</span></div></li>
<li><div class="src-line"><a name="a470"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id">FALSE&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">comma</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a471"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">&quot;A&nbsp;Pseudo-Element&nbsp;must&nbsp;be&nbsp;the&nbsp;last&nbsp;item&nbsp;in&nbsp;a&nbsp;selector.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a472"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a473"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span></div></li>
<li><div class="src-line"><a name="a474"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a475"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">pseudoClass</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a476"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a478"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a479"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a480"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a481"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;value&nbsp;of&nbsp;a&nbsp;pseudo-classes.</span></div></li>
<li><div class="src-line"><a name="a482"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a483"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a484"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;the&nbsp;value&nbsp;found&nbsp;from&nbsp;a&nbsp;pseudo-class.</span></div></li>
<li><div class="src-line"><a name="a485"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a486"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@todo</span><span class="src-doc">&nbsp;Pseudoclasses&nbsp;can&nbsp;be&nbsp;passed&nbsp;pseudo-elements&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a487"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;other&nbsp;pseudo-classes&nbsp;as&nbsp;values,&nbsp;which&nbsp;means&nbsp;:pseudo(::pseudo)</span></div></li>
<li><div class="src-line"><a name="a488"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;is&nbsp;legal.</span></div></li>
<li><div class="src-line"><a name="a489"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a490"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">pseudoClassValue</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a491"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lparen</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a492"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a493"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a494"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;For&nbsp;now,&nbsp;just&nbsp;leave&nbsp;pseudoClass&nbsp;value&nbsp;vague.</span></div></li>
<li><div class="src-line"><a name="a495"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">/*</span></div></li>
<li><div class="src-line"><a name="a496"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;We&nbsp;have&nbsp;to&nbsp;peek&nbsp;to&nbsp;see&nbsp;if&nbsp;next&nbsp;char&nbsp;is&nbsp;a&nbsp;colon&nbsp;because</span></div></li>
<li><div class="src-line"><a name="a497"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;pseudo-classes&nbsp;and&nbsp;pseudo-elements&nbsp;are&nbsp;legal&nbsp;strings&nbsp;here.</span></div></li>
<li><div class="src-line"><a name="a498"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;$this-&gt;scanner-&gt;peek();</span></div></li>
<li><div class="src-line"><a name="a499"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($this-&gt;scanner-&gt;peek()&nbsp;==&nbsp;':')&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a500"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&quot;Is&nbsp;pseudo\n&quot;;</span></div></li>
<li><div class="src-line"><a name="a501"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;scanner-&gt;nextToken();</span></div></li>
<li><div class="src-line"><a name="a502"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a503"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Pseudo&nbsp;class</span></div></li>
<li><div class="src-line"><a name="a504"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($this-&gt;scanner-&gt;token&nbsp;==&nbsp;CssToken::colon)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a505"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$buf&nbsp;.=&nbsp;':';</span></div></li>
<li><div class="src-line"><a name="a506"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;scanner-&gt;nextToken();</span></div></li>
<li><div class="src-line"><a name="a507"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Pseudo&nbsp;element</span></div></li>
<li><div class="src-line"><a name="a508"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($this-&gt;scanner-&gt;token&nbsp;==&nbsp;CssToken::colon)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a509"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$buf&nbsp;.=&nbsp;':';</span></div></li>
<li><div class="src-line"><a name="a510"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;scanner-&gt;nextToken();</span></div></li>
<li><div class="src-line"><a name="a511"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a512"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Ident&nbsp;</span></div></li>
<li><div class="src-line"><a name="a513"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$buf&nbsp;.=&nbsp;$this-&gt;scanner-&gt;getNameString();</span></div></li>
<li><div class="src-line"><a name="a514"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a515"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a516"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a517"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&quot;fetching&nbsp;string.\n&quot;;</span></div></li>
<li><div class="src-line"><a name="a518"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$buf&nbsp;.=&nbsp;$this-&gt;scanner-&gt;getQuotedString();</span></div></li>
<li><div class="src-line"><a name="a519"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;($this-&gt;scanner-&gt;token&nbsp;!=&nbsp;CssToken::rparen)&nbsp;{</span></div></li>
<li><div class="src-line"><a name="a520"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;throwError(CssToken::rparen,&nbsp;$this-&gt;scanner-&gt;token);</span></div></li>
<li><div class="src-line"><a name="a521"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a522"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;scanner-&gt;nextToken();</span></div></li>
<li><div class="src-line"><a name="a523"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></div></li>
<li><div class="src-line"><a name="a524"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;$buf;</span></div></li>
<li><div class="src-line"><a name="a525"></a><span class="src-comm">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a526"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getQuotedString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a527"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$buf</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a528"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a529"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a530"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a531"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a532"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handle&nbsp;element&nbsp;names.</span></div></li>
<li><div class="src-line"><a name="a533"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;call&nbsp;the&nbsp;CssEventHandler::elementName().</span></div></li>
<li><div class="src-line"><a name="a534"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a535"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;handles:</span></div></li>
<li><div class="src-line"><a name="a536"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;</span></div></li>
<li><div class="src-line"><a name="a537"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;name&nbsp;(CssEventHandler::element())</span></div></li>
<li><div class="src-line"><a name="a538"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;|name&nbsp;(CssEventHandler::element())</span></div></li>
<li><div class="src-line"><a name="a539"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;ns|name&nbsp;(CssEventHandler::elementNS())</span></div></li>
<li><div class="src-line"><a name="a540"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;ns|*&nbsp;(CssEventHandler::elementNS())</span></div></li>
<li><div class="src-line"><a name="a541"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a542"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a543"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">elementName</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a544"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span>print&nbsp;<span class="src-str">&quot;ELEMENT&nbsp;NAME\n&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a545"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a546"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;have&nbsp;'|name',&nbsp;which&nbsp;is&nbsp;equiv&nbsp;to&nbsp;'name'</span></div></li>
<li><div class="src-line"><a name="a547"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a548"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a549"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$elementName&nbsp;</span>=&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a550"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">element</span><span class="src-sym">(</span><span class="src-var">$elementName</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a551"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a552"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a553"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$elementName&nbsp;</span>=&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a554"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a555"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Get&nbsp;ns|name</span></div></li>
<li><div class="src-line"><a name="a556"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$elementNS&nbsp;</span>=&nbsp;<span class="src-var">$elementName</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a557"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a558"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a559"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a560"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;have&nbsp;ns|*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a561"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">anyElementInNS</span><span class="src-sym">(</span><span class="src-var">$elementNS</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a562"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a563"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a564"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a565"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a566"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a567"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a568"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$elementName&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a569"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;have&nbsp;ns|name</span></div></li>
<li><div class="src-line"><a name="a570"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">elementNS</span><span class="src-sym">(</span><span class="src-var">$elementName</span><span class="src-sym">,&nbsp;</span><span class="src-var">$elementNS</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a571"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a572"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a573"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a574"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a575"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">element</span><span class="src-sym">(</span><span class="src-var">$elementName</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a576"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a577"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a578"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a579"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a580"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a581"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;for&nbsp;all&nbsp;elements&nbsp;designators.&nbsp;Due&nbsp;to&nbsp;the&nbsp;new&nbsp;CSS&nbsp;3&nbsp;namespace</span></div></li>
<li><div class="src-line"><a name="a582"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;support,&nbsp;this&nbsp;is&nbsp;slightly&nbsp;more&nbsp;complicated,&nbsp;now,&nbsp;as&nbsp;it&nbsp;handles</span></div></li>
<li><div class="src-line"><a name="a583"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;*|name&nbsp;and&nbsp;*|*&nbsp;cases&nbsp;as&nbsp;well&nbsp;as&nbsp;*.</span></div></li>
<li><div class="src-line"><a name="a584"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a585"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Calls&nbsp;CssEventHandler::anyElement()&nbsp;or&nbsp;CssEventHandler::elementName().</span></div></li>
<li><div class="src-line"><a name="a586"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a587"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">allElements</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a588"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a589"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a590"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a591"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a592"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a593"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;got&nbsp;*|*.&nbsp;According&nbsp;to&nbsp;spec,&nbsp;this&nbsp;requires</span></div></li>
<li><div class="src-line"><a name="a594"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;that&nbsp;the&nbsp;element&nbsp;has&nbsp;a&nbsp;namespace,&nbsp;so&nbsp;we&nbsp;pass&nbsp;it&nbsp;on</span></div></li>
<li><div class="src-line"><a name="a595"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;to&nbsp;the&nbsp;handler:</span></div></li>
<li><div class="src-line"><a name="a596"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a597"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">anyElementInNS</span><span class="src-sym">(</span><span class="src-str">'*'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a598"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a599"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a600"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;got&nbsp;*|name,&nbsp;which&nbsp;means&nbsp;the&nbsp;name&nbsp;MUST&nbsp;be&nbsp;in&nbsp;a&nbsp;namespce,</span></div></li>
<li><div class="src-line"><a name="a601"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;so&nbsp;we&nbsp;pass&nbsp;this&nbsp;off&nbsp;to&nbsp;elementNameNS().</span></div></li>
<li><div class="src-line"><a name="a602"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a603"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">elementNS</span><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-str">'*'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a604"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a605"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a606"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a607"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">anyElement</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a608"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a609"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a610"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a611"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a612"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a613"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Handler&nbsp;an&nbsp;attribute.</span></div></li>
<li><div class="src-line"><a name="a614"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;An&nbsp;attribute&nbsp;can&nbsp;be&nbsp;in&nbsp;one&nbsp;of&nbsp;two&nbsp;forms:</span></div></li>
<li><div class="src-line"><a name="a615"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;[attrName]&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a616"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a617"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&lt;code&gt;[attrName=&quot;AttrValue&quot;]&lt;/code&gt;</span></div></li>
<li><div class="src-line"><a name="a618"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a619"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;may&nbsp;call&nbsp;the&nbsp;following&nbsp;event&nbsp;handlers:&nbsp;CssEventHandler::attribute().</span></div></li>
<li><div class="src-line"><a name="a620"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a621"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">attribute</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a622"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lsquare</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a623"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attrVal&nbsp;</span>=&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-var">$ns&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a624"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a625"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a626"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a627"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a628"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">at</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a629"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$strict">strict</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a630"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-str">'The&nbsp;@&nbsp;is&nbsp;illegal&nbsp;in&nbsp;attributes.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a631"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a632"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a633"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a634"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a635"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a636"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a637"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a638"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a639"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Global&nbsp;namespace...&nbsp;requires&nbsp;that&nbsp;attr&nbsp;be&nbsp;prefixed,</span></div></li>
<li><div class="src-line"><a name="a640"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;so&nbsp;we&nbsp;pass&nbsp;this&nbsp;on&nbsp;to&nbsp;a&nbsp;namespace&nbsp;handler.</span></div></li>
<li><div class="src-line"><a name="a641"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ns&nbsp;</span>=&nbsp;<span class="src-str">'*'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a642"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a643"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a644"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a645"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Skip&nbsp;this.&nbsp;It's&nbsp;a&nbsp;global&nbsp;namespace.</span></div></li>
<li><div class="src-line"><a name="a646"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a647"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a648"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a649"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a650"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attrName&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a651"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a652"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a653"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;for&nbsp;namespace&nbsp;attribute:&nbsp;ns|attr.&nbsp;We&nbsp;have&nbsp;to&nbsp;peek()&nbsp;to&nbsp;make&nbsp;</span></div></li>
<li><div class="src-line"><a name="a654"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;sure&nbsp;that&nbsp;we&nbsp;haven't&nbsp;hit&nbsp;the&nbsp;|=&nbsp;operator,&nbsp;which&nbsp;looks&nbsp;the&nbsp;same.</span></div></li>
<li><div class="src-line"><a name="a655"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">peek</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-str">'='</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a656"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;We&nbsp;have&nbsp;a&nbsp;namespaced&nbsp;attribute.&nbsp;</span></div></li>
<li><div class="src-line"><a name="a657"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ns&nbsp;</span>=&nbsp;<span class="src-var">$attrName</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a658"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a659"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attrName&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a660"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a661"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a662"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a663"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Note:&nbsp;We&nbsp;require&nbsp;that&nbsp;operators&nbsp;do&nbsp;not&nbsp;have&nbsp;spaces&nbsp;</span></div></li>
<li><div class="src-line"><a name="a664"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;between&nbsp;characters,&nbsp;e.g.&nbsp;~=&nbsp;,&nbsp;not&nbsp;~&nbsp;=.</span></div></li>
<li><div class="src-line"><a name="a665"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a666"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Get&nbsp;the&nbsp;operator:</span></div></li>
<li><div class="src-line"><a name="a667"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">switch&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a668"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span>:</div></li>
<li><div class="src-line"><a name="a669"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a670"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">isExactly</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a671"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a672"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">tilde</span>:</div></li>
<li><div class="src-line"><a name="a673"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a674"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a675"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a676"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">containsWithSpace</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a677"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a678"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span>:</div></li>
<li><div class="src-line"><a name="a679"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a680"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a681"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a682"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">containsWithHyphen</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a683"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a684"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span>:</div></li>
<li><div class="src-line"><a name="a685"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a686"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a687"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a688"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">containsInString</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a689"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a690"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">dollar</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a691"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a692"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a693"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a694"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">endsWith</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a695"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a696"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">carat</span>:</div></li>
<li><div class="src-line"><a name="a697"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a698"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a699"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a700"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$op&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssEventHandler.html">CssEventHandler</a></span><span class="src-sym">::</span><span class="src-id">beginsWith</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a701"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a702"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a703"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a704"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$op</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a705"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Consume&nbsp;'='&nbsp;and&nbsp;go&nbsp;on.</span></div></li>
<li><div class="src-line"><a name="a706"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a707"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a708"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a709"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;So...&nbsp;here&nbsp;we&nbsp;have&nbsp;a&nbsp;problem.&nbsp;The&nbsp;grammer&nbsp;suggests&nbsp;that&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a710"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;value&nbsp;here&nbsp;is&nbsp;String1&nbsp;or&nbsp;String2,&nbsp;both&nbsp;of&nbsp;which&nbsp;are&nbsp;enclosed</span></div></li>
<li><div class="src-line"><a name="a711"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;in&nbsp;quotes&nbsp;of&nbsp;some&nbsp;sort,&nbsp;and&nbsp;both&nbsp;of&nbsp;which&nbsp;allow&nbsp;lots&nbsp;of&nbsp;special&nbsp;</span></div></li>
<li><div class="src-line"><a name="a712"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;characters.&nbsp;But&nbsp;the&nbsp;spec&nbsp;itself&nbsp;includes&nbsp;examples&nbsp;like&nbsp;this:</span></div></li>
<li><div class="src-line"><a name="a713"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;&nbsp;&nbsp;[lang=fr]</span></div></li>
<li><div class="src-line"><a name="a714"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;So&nbsp;some&nbsp;bareword&nbsp;support&nbsp;is&nbsp;assumed.&nbsp;To&nbsp;get&nbsp;around&nbsp;this,&nbsp;we&nbsp;assume</span></div></li>
<li><div class="src-line"><a name="a715"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;that&nbsp;bare&nbsp;words&nbsp;follow&nbsp;the&nbsp;NAME&nbsp;rules,&nbsp;while&nbsp;quoted&nbsp;strings&nbsp;follow</span></div></li>
<li><div class="src-line"><a name="a716"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;String1/String2&nbsp;rules.</span></div></li>
<li><div class="src-line"><a name="a717"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a718"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">quote&nbsp;</span>||&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">squote</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a719"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attrVal&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getQuotedString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a720"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a721"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a722"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$attrVal&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">getNameString</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a723"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a724"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a725"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$DEBUG">DEBUG</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a726"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;</span><span class="src-str">ATTR:&nbsp;<span class="src-var">$attrVal</span>&nbsp;AND&nbsp;OP:&nbsp;<span class="src-var">$op</span>\n</span><span class="src-str">&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a727"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a728"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a729"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a730"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">consumeWhitespace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a731"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a732"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>!=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rsquare</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a733"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rsquare</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a734"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a735"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a736"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$ns</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a737"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">attributeNS</span><span class="src-sym">(</span><span class="src-var">$attrName</span><span class="src-sym">,&nbsp;</span><span class="src-var">$ns</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attrVal</span><span class="src-sym">,&nbsp;</span><span class="src-var">$op</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a738"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a739"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$attrVal</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a740"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">attribute</span><span class="src-sym">(</span><span class="src-var">$attrName</span><span class="src-sym">,&nbsp;</span><span class="src-var">$attrVal</span><span class="src-sym">,&nbsp;</span><span class="src-var">$op</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a741"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a742"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a743"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$handler">handler</a><span class="src-sym">-&gt;</span><span class="src-id">attribute</span><span class="src-sym">(</span><span class="src-var">$attrName</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a744"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a745"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssParser.html#var$scanner">scanner</a><span class="src-sym">-&gt;</span><span class="src-id">nextToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a746"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a747"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a748"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a749"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a750"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Utility&nbsp;for&nbsp;throwing&nbsp;a&nbsp;consistantly-formatted&nbsp;parse&nbsp;error.</span></div></li>
<li><div class="src-line"><a name="a751"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a752"></a>&nbsp;&nbsp;<span class="src-key">private&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-id">throwError</span><span class="src-sym">(</span><span class="src-var">$expected</span><span class="src-sym">,&nbsp;</span><span class="src-var">$got</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a753"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$filter&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">'Expected&nbsp;%s,&nbsp;got&nbsp;%s'</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><a href="../QueryPath/CSSParser/CssToken.html#methodname">name</a><span class="src-sym">(</span><span class="src-var">$expected</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><a href="../QueryPath/CSSParser/CssToken.html#methodname">name</a><span class="src-sym">(</span><span class="src-var">$got</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a754"></a>&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">CssParseException</span><span class="src-sym">(</span><span class="src-var">$filter</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a755"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a756"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a757"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a758"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a759"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a760"></a><span class="src-doc">&nbsp;*&nbsp;Scanner&nbsp;for&nbsp;CSS&nbsp;selector&nbsp;parsing.</span></div></li>
<li><div class="src-line"><a name="a761"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a762"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;provides&nbsp;a&nbsp;simple&nbsp;scanner&nbsp;for&nbsp;traversing&nbsp;an&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a763"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a764"></a><span class="src-key">final&nbsp;</span><span class="src-key">class&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html">CssScanner</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a765"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$is">$is</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a766"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">$value</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a767"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">$token</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a768"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a769"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$recurse">$recurse</a>&nbsp;=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a770"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$it">$it</a>&nbsp;=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a771"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a772"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a773"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;a&nbsp;new&nbsp;input&nbsp;stream,&nbsp;tokenize&nbsp;the&nbsp;CSS&nbsp;selector&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a774"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@see</span><span class="src-doc">&nbsp;CssInputStream</span></div></li>
<li><div class="src-line"><a name="a775"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">CssInputStream&nbsp;</span><span class="src-doc-var">$in&nbsp;</span></div></li>
<li><div class="src-line"><a name="a776"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;An&nbsp;input&nbsp;stream&nbsp;to&nbsp;be&nbsp;scanned.</span></div></li>
<li><div class="src-line"><a name="a777"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a778"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-id">CssInputStream&nbsp;</span><span class="src-var">$in</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a779"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$is">is</a>&nbsp;=&nbsp;<span class="src-var">$in</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a780"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a781"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a782"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a783"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;See&nbsp;the&nbsp;next&nbsp;char&nbsp;without&nbsp;removing&nbsp;it&nbsp;from&nbsp;the&nbsp;stack.</span></div></li>
<li><div class="src-line"><a name="a784"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a785"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">char&nbsp;</span></div></li>
<li><div class="src-line"><a name="a786"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;the&nbsp;next&nbsp;character&nbsp;on&nbsp;the&nbsp;stack.</span></div></li>
<li><div class="src-line"><a name="a787"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a788"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodpeek">peek</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a789"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$is">is</a><span class="src-sym">-&gt;</span><span class="src-id">peek</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a790"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a791"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a792"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a793"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;next&nbsp;token&nbsp;in&nbsp;the&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a794"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a795"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;sets&nbsp;the&nbsp;current&nbsp;token&nbsp;to&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;next&nbsp;token&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a796"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a797"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a798"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">int&nbsp;</span></div></li>
<li><div class="src-line"><a name="a799"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;an&nbsp;int&nbsp;value&nbsp;corresponding&nbsp;to&nbsp;one&nbsp;of&nbsp;the&nbsp;CssToken&nbsp;constants,</span></div></li>
<li><div class="src-line"><a name="a800"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;or&nbsp;FALSE&nbsp;if&nbsp;the&nbsp;end&nbsp;of&nbsp;the&nbsp;string&nbsp;is&nbsp;reached.&nbsp;(Remember&nbsp;to&nbsp;use</span></div></li>
<li><div class="src-line"><a name="a801"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;strong&nbsp;equality&nbsp;checking&nbsp;on&nbsp;FALSE,&nbsp;since&nbsp;0&nbsp;is&nbsp;a&nbsp;valid&nbsp;token&nbsp;id.)</span></div></li>
<li><div class="src-line"><a name="a802"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a803"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a804"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a805"></a>&nbsp;&nbsp;&nbsp;&nbsp;++<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$it">it</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a806"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$is">is</a><span class="src-sym">-&gt;</span><span class="src-id">isEmpty</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a807"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$recurse">recurse</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a808"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Exception</span><span class="src-sym">(</span><span class="src-str">&quot;Recursion&nbsp;error&nbsp;detected&nbsp;at&nbsp;iteration&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$it">it</a>&nbsp;.&nbsp;<span class="src-str">'.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a809"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">exit</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a810"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a811"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//print&nbsp;&quot;{$this-&gt;it}:&nbsp;All&nbsp;done\n&quot;;</span></div></li>
<li><div class="src-line"><a name="a812"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$recurse">recurse</a>&nbsp;=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a813"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a814"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a815"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a816"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ch&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$is">is</a><span class="src-sym">-&gt;</span><span class="src-id">consume</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a817"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//print&nbsp;__FUNCTION__&nbsp;.&nbsp;&quot;&nbsp;Testing&nbsp;$ch.\n&quot;;</span></div></li>
<li><div class="src-line"><a name="a818"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/ctype_space">ctype_space</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a819"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a>&nbsp;=&nbsp;<span class="src-str">'&nbsp;'</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Collapse&nbsp;all&nbsp;WS&nbsp;to&nbsp;a&nbsp;space.</span></div></li>
<li><div class="src-line"><a name="a820"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;=&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">white</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a821"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//$ch&nbsp;=&nbsp;$this-&gt;is-&gt;consume();</span></div></li>
<li><div class="src-line"><a name="a822"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$tok</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a823"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a824"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a825"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/ctype_alnum">ctype_alnum</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-var">$ch&nbsp;</span>==&nbsp;<span class="src-str">'-'&nbsp;</span>||&nbsp;<span class="src-var">$ch&nbsp;</span>==&nbsp;<span class="src-str">'_'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a826"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;It's&nbsp;a&nbsp;character</span></div></li>
<li><div class="src-line"><a name="a827"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a>&nbsp;=&nbsp;<span class="src-var">$ch</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//strtolower($ch);</span></div></li>
<li><div class="src-line"><a name="a828"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;=&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a829"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$tok</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a830"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a831"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a832"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a>&nbsp;=&nbsp;<span class="src-var">$ch</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a833"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a834"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a835"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'*'</span>:</div></li>
<li><div class="src-line"><a name="a836"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">star</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a837"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a838"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><a href="http://www.php.net/chr">chr</a><span class="src-sym">(</span><a href="http://www.php.net/ord">ord</a><span class="src-sym">(</span><span class="src-str">'&gt;'</span><span class="src-sym">))</span>:</div></li>
<li><div class="src-line"><a name="a839"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rangle</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a840"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a841"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'.'</span>:</div></li>
<li><div class="src-line"><a name="a842"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">dot</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a843"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a844"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'#'</span>:</div></li>
<li><div class="src-line"><a name="a845"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">octo</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a846"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a847"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'['</span>:</div></li>
<li><div class="src-line"><a name="a848"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lsquare</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a849"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a850"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">']'</span>:</div></li>
<li><div class="src-line"><a name="a851"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rsquare</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a852"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a853"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">':'</span>:</div></li>
<li><div class="src-line"><a name="a854"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">colon</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a855"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a856"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'('</span>:</div></li>
<li><div class="src-line"><a name="a857"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lparen</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a858"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a859"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">')'</span>:</div></li>
<li><div class="src-line"><a name="a860"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rparen</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a861"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a862"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'+'</span>:</div></li>
<li><div class="src-line"><a name="a863"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">plus</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a864"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a865"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'~'</span>:</div></li>
<li><div class="src-line"><a name="a866"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">tilde</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a867"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a868"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'='</span>:</div></li>
<li><div class="src-line"><a name="a869"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">eq</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a870"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a871"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'|'</span>:</div></li>
<li><div class="src-line"><a name="a872"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">pipe</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a873"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a874"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">','</span>:</div></li>
<li><div class="src-line"><a name="a875"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">comma</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a876"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a877"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><a href="http://www.php.net/chr">chr</a><span class="src-sym">(</span><span class="src-num">34</span><span class="src-sym">)</span>:</div></li>
<li><div class="src-line"><a name="a878"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">quote</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a879"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a880"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">&quot;'&quot;</span>:</div></li>
<li><div class="src-line"><a name="a881"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">squote</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a882"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a883"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'\\'</span>:</div></li>
<li><div class="src-line"><a name="a884"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">bslash</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a885"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a886"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'^'</span>:</div></li>
<li><div class="src-line"><a name="a887"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">carat</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a888"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a889"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'$'</span>:</div></li>
<li><div class="src-line"><a name="a890"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">dollar</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a891"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a892"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">case&nbsp;</span><span class="src-str">'@'</span>:</div></li>
<li><div class="src-line"><a name="a893"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">at</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a894"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a895"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a896"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a897"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a898"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Catch&nbsp;all&nbsp;characters&nbsp;that&nbsp;are&nbsp;legal&nbsp;within&nbsp;strings.</span></div></li>
<li><div class="src-line"><a name="a899"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$tok&nbsp;</span>==&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a900"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;This&nbsp;should&nbsp;be&nbsp;UTF-8&nbsp;compatible,&nbsp;but&nbsp;PHP&nbsp;doesn't</span></div></li>
<li><div class="src-line"><a name="a901"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;have&nbsp;a&nbsp;native&nbsp;UTF-8&nbsp;string.&nbsp;Should&nbsp;we&nbsp;use&nbsp;external</span></div></li>
<li><div class="src-line"><a name="a902"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;mbstring&nbsp;library?</span></div></li>
<li><div class="src-line"><a name="a903"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a904"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ord&nbsp;</span>=&nbsp;<a href="http://www.php.net/ord">ord</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a905"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Characters&nbsp;in&nbsp;this&nbsp;pool&nbsp;are&nbsp;legal&nbsp;for&nbsp;use&nbsp;inside&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a906"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;certain&nbsp;strings.&nbsp;Extended&nbsp;ASCII&nbsp;is&nbsp;used&nbsp;here,&nbsp;though&nbsp;I</span></div></li>
<li><div class="src-line"><a name="a907"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Don't&nbsp;know&nbsp;if&nbsp;these&nbsp;are&nbsp;really&nbsp;legal.</span></div></li>
<li><div class="src-line"><a name="a908"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">((</span><span class="src-var">$ord&nbsp;</span>&gt;=&nbsp;<span class="src-num">32&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$ord&nbsp;</span>&lt;=&nbsp;<span class="src-num">126</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">(</span><span class="src-var">$ord&nbsp;</span>&gt;=&nbsp;<span class="src-num">128&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$ord&nbsp;</span>&lt;=&nbsp;<span class="src-num">255</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a909"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">stringLegal</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a910"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a911"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a912"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Exception</span><span class="src-sym">(</span><span class="src-str">'Illegal&nbsp;characters&nbsp;found&nbsp;in&nbsp;stream.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a913"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a914"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a915"></a>&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a916"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;=&nbsp;<span class="src-var">$tok</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a917"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$tok</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a918"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a919"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a920"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a921"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;a&nbsp;name&nbsp;string&nbsp;from&nbsp;the&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a922"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;A&nbsp;name&nbsp;string&nbsp;must&nbsp;be&nbsp;composed&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a923"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;only&nbsp;characters&nbsp;defined&nbsp;in&nbsp;CssToken:char:&nbsp;-_a-zA-Z0-9</span></div></li>
<li><div class="src-line"><a name="a924"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a925"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodgetNameString">getNameString</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a926"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a927"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a928"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a929"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a930"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//print&nbsp;'_';</span></div></li>
<li><div class="src-line"><a name="a931"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a932"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$buf</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a933"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a934"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a935"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a936"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;gets&nbsp;a&nbsp;string&nbsp;with&nbsp;any&nbsp;legal&nbsp;'string'&nbsp;characters.</span></div></li>
<li><div class="src-line"><a name="a937"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;See&nbsp;CSS&nbsp;Selectors&nbsp;specification,&nbsp;section&nbsp;11,&nbsp;for&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a938"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;definition&nbsp;of&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a939"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a940"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;check&nbsp;for&nbsp;string1,&nbsp;string2,&nbsp;and&nbsp;the&nbsp;case&nbsp;where&nbsp;a</span></div></li>
<li><div class="src-line"><a name="a941"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;string&nbsp;is&nbsp;unquoted&nbsp;(Oddly&nbsp;absent&nbsp;from&nbsp;the&nbsp;&quot;official&quot;&nbsp;grammar,</span></div></li>
<li><div class="src-line"><a name="a942"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;though&nbsp;such&nbsp;strings&nbsp;are&nbsp;present&nbsp;as&nbsp;examples&nbsp;in&nbsp;the&nbsp;spec.)</span></div></li>
<li><div class="src-line"><a name="a943"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a944"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Note:</span></div></li>
<li><div class="src-line"><a name="a945"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Though&nbsp;the&nbsp;grammar&nbsp;supplied&nbsp;by&nbsp;CSS&nbsp;3&nbsp;Selectors&nbsp;section&nbsp;11&nbsp;does&nbsp;not</span></div></li>
<li><div class="src-line"><a name="a946"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;address&nbsp;the&nbsp;contents&nbsp;of&nbsp;a&nbsp;pseudo-class&nbsp;value,&nbsp;the&nbsp;spec&nbsp;itself&nbsp;indicates</span></div></li>
<li><div class="src-line"><a name="a947"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;that&nbsp;a&nbsp;pseudo-class&nbsp;value&nbsp;is&nbsp;a&nbsp;&quot;value&nbsp;between&nbsp;parenthesis&quot;&nbsp;[6.6].&nbsp;The</span></div></li>
<li><div class="src-line"><a name="a948"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;examples&nbsp;given&nbsp;use&nbsp;URLs&nbsp;among&nbsp;other&nbsp;things,&nbsp;making&nbsp;them&nbsp;closer&nbsp;to&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a949"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;definition&nbsp;of&nbsp;'string'&nbsp;than&nbsp;to&nbsp;'name'.&nbsp;So&nbsp;we&nbsp;handle&nbsp;them&nbsp;here&nbsp;as&nbsp;strings.</span></div></li>
<li><div class="src-line"><a name="a950"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a951"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodgetQuotedString">getQuotedString</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a952"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">quote&nbsp;</span>||&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">squote&nbsp;</span>||&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lparen</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a953"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$end&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">lparen</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">rparen&nbsp;</span>:&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a954"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a955"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$escape&nbsp;</span>=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a956"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a957"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Skip&nbsp;the&nbsp;opening&nbsp;quote/paren</span></div></li>
<li><div class="src-line"><a name="a958"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a959"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;second&nbsp;conjunct&nbsp;is&nbsp;probably&nbsp;not&nbsp;necessary.</span></div></li>
<li><div class="src-line"><a name="a960"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;!==&nbsp;<span class="src-id">FALSE&nbsp;</span>&amp;&amp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;&gt;&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a961"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//print&nbsp;&quot;Char:&nbsp;$this-&gt;value&nbsp;\n&quot;;</span></div></li>
<li><div class="src-line"><a name="a962"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">bslash</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a963"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Turn&nbsp;on&nbsp;escaping.</span></div></li>
<li><div class="src-line"><a name="a964"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a965"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$escape&nbsp;</span>=&nbsp;<span class="src-id">TRUE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a966"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a967"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$escape</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a968"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Turn&nbsp;off&nbsp;escaping</span></div></li>
<li><div class="src-line"><a name="a969"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a970"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$escape&nbsp;</span>=&nbsp;<span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a971"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a972"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">elseif&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;===&nbsp;<span class="src-var">$end</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a973"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;At&nbsp;end&nbsp;of&nbsp;string;&nbsp;skip&nbsp;token&nbsp;and&nbsp;break.</span></div></li>
<li><div class="src-line"><a name="a974"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a975"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">break</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a976"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a977"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a978"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Append&nbsp;char.</span></div></li>
<li><div class="src-line"><a name="a979"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a980"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a981"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a982"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a983"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$buf</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a984"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a985"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a986"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a987"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a988"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;a&nbsp;string&nbsp;from&nbsp;the&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a989"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;convenience&nbsp;function&nbsp;for&nbsp;getting&nbsp;a&nbsp;string&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a990"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;characters&nbsp;that&nbsp;are&nbsp;either&nbsp;alphanumber&nbsp;or&nbsp;whitespace.&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a991"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;CssToken::white&nbsp;and&nbsp;CssToken::char&nbsp;definitions.</span></div></li>
<li><div class="src-line"><a name="a992"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a993"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodgetStringPlusWhitespace">getStringPlusWhitespace</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a994"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>=&nbsp;<span class="src-str">''</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a995"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;===&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-key">return&nbsp;</span><span class="src-str">''</span><span class="src-sym">;</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a996"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;===&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">char&nbsp;</span>||&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$token">token</a>&nbsp;==&nbsp;<span class="src-id"><a href="../QueryPath/CSSParser/CssToken.html">CssToken</a></span><span class="src-sym">::</span><span class="src-id">white</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a997"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$buf&nbsp;</span>.=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#var$value">value</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a998"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssScanner.html#methodnextToken">nextToken</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a999"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1000"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$buf</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1001"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1002"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a1003"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1004"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1005"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1006"></a><span class="src-doc">&nbsp;*&nbsp;Simple&nbsp;wrapper&nbsp;to&nbsp;turn&nbsp;a&nbsp;string&nbsp;into&nbsp;an&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a1007"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;provides&nbsp;a&nbsp;standard&nbsp;interface&nbsp;on&nbsp;top&nbsp;of&nbsp;an&nbsp;array&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a1008"></a><span class="src-doc">&nbsp;*&nbsp;characters.</span></div></li>
<li><div class="src-line"><a name="a1009"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1010"></a><span class="src-key">class&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html">CssInputStream</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1011"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html#var$stream">$stream</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1012"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1013"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Build&nbsp;a&nbsp;new&nbsp;CSS&nbsp;input&nbsp;stream&nbsp;from&nbsp;a&nbsp;string.</span></div></li>
<li><div class="src-line"><a name="a1014"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1015"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1016"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;</span><span class="src-doc">String&nbsp;to&nbsp;turn&nbsp;into&nbsp;an&nbsp;input&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a1017"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1018"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1019"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssInputStream.html#var$stream">stream</a>&nbsp;=&nbsp;<a href="http://www.php.net/str_split">str_split</a><span class="src-sym">(</span><span class="src-var">$string</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1020"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1021"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1022"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Look&nbsp;ahead&nbsp;one&nbsp;character.</span></div></li>
<li><div class="src-line"><a name="a1023"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1024"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">char&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1025"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Returns&nbsp;the&nbsp;next&nbsp;character,&nbsp;but&nbsp;does&nbsp;not&nbsp;remove&nbsp;it&nbsp;from</span></div></li>
<li><div class="src-line"><a name="a1026"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;the&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a1027"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1028"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html#methodpeek">peek</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1029"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssInputStream.html#var$stream">stream</a><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1030"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1031"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1032"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;next&nbsp;unconsumed&nbsp;character&nbsp;in&nbsp;the&nbsp;stream.</span></div></li>
<li><div class="src-line"><a name="a1033"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;will&nbsp;remove&nbsp;that&nbsp;character&nbsp;from&nbsp;the&nbsp;front&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a1034"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;stream&nbsp;and&nbsp;return&nbsp;it.</span></div></li>
<li><div class="src-line"><a name="a1035"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1036"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html#methodconsume">consume</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1037"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_shift">array_shift</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssInputStream.html#var$stream">stream</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1038"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1039"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1040"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Check&nbsp;if&nbsp;the&nbsp;stream&nbsp;is&nbsp;empty.</span></div></li>
<li><div class="src-line"><a name="a1041"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span></div></li>
<li><div class="src-line"><a name="a1042"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;Returns&nbsp;TRUE&nbsp;when&nbsp;the&nbsp;stream&nbsp;is&nbsp;empty,&nbsp;FALSE&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1043"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1044"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../QueryPath/CSSParser/CssInputStream.html#methodisEmpty">isEmpty</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1045"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../QueryPath/CSSParser/CssInputStream.html#var$stream">stream</a><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1046"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1047"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1048"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1049"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1050"></a><span class="src-doc">&nbsp;*&nbsp;Exception&nbsp;indicating&nbsp;an&nbsp;error&nbsp;in&nbsp;CSS&nbsp;parsing.</span></div></li>
<li><div class="src-line"><a name="a1051"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1052"></a><span class="src-key">class&nbsp;</span><a href="../QueryPath/CSSParser/CSSParseException.html">CSSParseException</a>&nbsp;<span class="src-key">extends&nbsp;</span><span class="src-id">EXCEPTION&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
</ol>
</span></div>
        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Thu, 19 Mar 2009 18:01:08 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>